// import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs';

// import { isHidden } from 'element-plus/es/components/focus-trap/index.mjs';
// import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs';

//对外暴露配置路由(常量路由)
export const constantRoute=[
    {
        //登录
        path:'/login',
        component:()=>import('@/views/login/index.vue'),
        name:'login', //命名路由
        meta:{
            title:'登录', //菜单标题
            hidden:true//代表路由标题在菜单中是否隐藏
        }
    },
    {
        //登录成功以后展示数据的路由
        path:'/',
        component:()=>import('@/layout/index.vue'),
        name:'layout',
        meta:{
            title:'', //菜单标题
            hidden:false,
            icon:''
        },
        redirect: '/home',
        children:[
            {
                path:'/home',
                component:()=> import('@/views/home/index.vue'),
                meta:{
                    title:'首页' ,//菜单标题
                    hidden:false,
                    icon:'House'
                }
            }
           
        ]
    },
    {
        //管理中心
        path:'/management',
        component:()=>import('@/management/index.vue'),
        name:'management',
        meta:{
            title:'management',
            hidden:true
        },
        redirect: '/management/self',
        children: [
            {
                path:'self',
                component:()=> import('@/views/self/index.vue'),
                meta:{
                    title:'个人中心',
                    hidden:false,
                }
            },
            {
                path:'userManage',
                component:()=> import('@/views/userManage/index.vue'),
                meta:{
                    title:'用户管理',
                    hidden:false,   
                }
            }     
        ]
    },
    {
        //404
        path:'/404',
        component:()=>import('@/views/404/index.vue'),
        name:'404',
        meta:{
            title:'404', //菜单标题
            hidden:true ,
            icon:'SwitchButton'
        }
    },
    {
        path:'/:pathMatch(.*)*',
        redirect:'/404',
        name:'Any',
        meta:{
            title:'任意路由', //菜单标题
            hidden:true,
            icon:'Operation'
        }
    }
]
